package cn.com.assistant.service;

import cn.com.assistant.entity.AnswerEntity;
import cn.com.assistant.model.ImageDTO;
import cn.com.assistant.utils.ResponseMessage;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.stereotype.Service;

@Service
public interface AnswerService extends IService<AnswerEntity> {

    /**
     * 根据问题id删除问题回复
     * @param questionId
     * @return
     */
    Boolean deleteByQuestionId(String questionId);

    /**
     * 分页列表
     * @param pageNum
     * @param size
     * @return
     */
    ResponseMessage findByPage(int pageNum, int size);

    /**
     * 根据问题id查询回复列表
     * @return
     */
    ResponseMessage findByQid(String questionId);

    /**
     * 更新记录
     * @param answerEntity
     * @return
     */
    ResponseMessage update(AnswerEntity answerEntity);

    /**
     * 更新一级问题回复图片
     * @param imageDTO
     * @return
     */
    ResponseMessage updateImage(ImageDTO imageDTO);

    /**
     * 获取所有故障及处理措施
     * @return
     */
    ResponseMessage getAllFault();

}